package org.ma1.cripto.aes.gui.dialogos;


public class DialogoBuilder {
	
	public static final String COLORES = "colores";
	public static final String CONFIGURAR = "configurar";
	public static final String CRIPTOANALISIS = "criptoanalisis";
	
	private static DialogoBuilder instance = null;
	private DialogoBuilder() {}
	public static DialogoBuilder getCurrentInstance() {
		if (instance == null) {
			instance = new DialogoBuilder();
		}
		return instance;
	}
	public IDialogo createDialogo(String name) {
		IDialogo ret = null;
		if (name.equals(COLORES)) { 
			ret = new ColoresDialog();
		}
		else if (name.equals(CONFIGURAR)){
			ret = new ConfigurarDialog();
		}
		else if (name.equals(CRIPTOANALISIS)){
			ret = new CriptoanalisisDialog();
		}
		return ret;
	}
}
